﻿using UnityEngine;
using UnityEditor;
namespace UGUIFW
{
    public enum EUIName
    {
        None,
        Login_UI,
        MainCity_UI,
        HeroInfo_UI,
        Coin_UI,
        HeroInfoDetail_UI,
        Popupl_UI,
        Popupl_UI_1,
        Popupl_UI_2,
        Market_UI,
        Normal_01,
        Normal_02
    }

    public class UIData
    {
        public static BaseUI GetUIData(EUIName uiName)
        {
            switch (uiName)
            {
                case EUIName.Login_UI:
                    return new LoginUI(new UIInfo(uiName, "UIPrefabs/LoginUI", EUIBaseType.Normal, EUILucenyType.Pentrate));
                case EUIName.Normal_01:
                    return new NormalUI_01(new UIInfo(uiName, "UIPrefabs/NormalUI_01", EUIBaseType.Normal, EUILucenyType.Pentrate, EUIName.HeroInfo_UI));
                case EUIName.Normal_02:
                    return new NormalUI_02(new UIInfo(uiName, "UIPrefabs/NormalUI_02", EUIBaseType.Normal, EUILucenyType.Pentrate, EUIName.HeroInfo_UI));
                case EUIName.MainCity_UI:
                    return new MainCityUI(new UIInfo(uiName, "UIPrefabs/MainCityUI", EUIBaseType.Normal, EUILucenyType.Pentrate, EUIName.HeroInfo_UI));
                case EUIName.HeroInfo_UI:
                    return new HeroInfoUI(new UIInfo(uiName, "UIPrefabs/HeroInfoUI", EUIBaseType.Fixed, EUILucenyType.Pentrate));
                case EUIName.Coin_UI:
                    return new CoinUI(new UIInfo(uiName, "UIPrefabs/CoinUI", EUIBaseType.Fixed, EUILucenyType.Pentrate));
                case EUIName.HeroInfoDetail_UI:
                    return new HeroInfoDetailUI(new UIInfo(uiName, "UIPrefabs/HeroInfoDetailUI", EUIBaseType.Normal, EUILucenyType.Pentrate));
                case EUIName.Popupl_UI:
                    return new PopuplUI(new UIInfo(uiName, "UIPrefabs/PopuplUI", EUIBaseType.Popup, EUILucenyType.Translucency));
                case EUIName.Market_UI:
                    return new MarketUI(new UIInfo(uiName, "UIPrefabs/MarketUI", EUIBaseType.Normal, EUILucenyType.Pentrate, EUIName.Coin_UI));
                case EUIName.Popupl_UI_1:
                    return new PopuplUI1(new UIInfo(uiName, "UIPrefabs/PopuplUI1", EUIBaseType.Popup, EUILucenyType.Translucency));
                case EUIName.Popupl_UI_2:
                    return new PopuplUI2(new UIInfo(uiName, "UIPrefabs/PopuplUI2", EUIBaseType.Popup, EUILucenyType.Translucency));
                default:
                    return null;
            }
        }
    }
}